home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
fish
/
001-100
/
001-025
/
002
/
dbug
/
factorial.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-17
|
347b
|
16 lines
#include <stdio.h>
/* User programs should use <local/dbug.h> */
#include "dbug.h"
int factorial (value)
register int value;
{
DBUG_ENTER ("factorial");
DBUG_3 ("find", "find %d factorial", value);
if (value > 1) {
value *= factorial (value - 1);
}
DBUG_3 ("result", "result is %d", value);
DBUG_RETURN (value);
}